<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/3/8
 * Time: 16:10
 * 商户模块
 */
namespace app\index\controller;
use think\Controller;
use think\Db;
use think\Request;
use think\Validate;

class Merchant extends Base
{
    /**
     * 获取分类统计
     */
    public function getClassCount(){

        $sel_class = Db::name('city_statistics')
            ->find();

        return json(['status'=>200,'msg'=>"拉取成功",'data'=>$sel_class]);
    }

    /**
     * 商家首页分类/1等分类
     */
    public function getShopClass(){
        $sel_classify = Db::name('city_classify')
            ->field('id,classify_name,iconurl')
            ->where(['parent_id' => 0 ,'show_flag' => 1,'delete_flag' =>1])
            ->select();

        return json(['status'=>200,'msg'=>"拉取成功",'data'=>$sel_classify]);
    }
}

